﻿<Page x:Class="PMisuseAn.ContextInterface"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
      xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
      mc:Ignorable="d" 
      d:DesignHeight="695" d:DesignWidth="728"
	Title="ContextInterface" VerticalAlignment="Top">

    <Grid Margin="10,0,10,10" Height="689" VerticalAlignment="Top" Width="714">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="32*" />
        </Grid.ColumnDefinitions>
        
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="130" />
            <RowDefinition Height="87" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="149*" />
        </Grid.RowDefinitions>
      
        <!--constraints-->
        <!--table for constraints-->
        <!--privacy policies-->
        <!--table for policies-->
        <!--system functional behaviour-->
        <TabControl Grid.Row="1" Grid.RowSpan="8" Height="276" HorizontalAlignment="Left" Name="tabControl1" VerticalAlignment="Top" Width="706" Margin="0,25,0,0">
            <TabItem Style="{DynamicResource customTabItem1}" Header="Domain model" Name="tabItem1" ToolTip="Domain knowledge base">
                <TabControl  Grid.Row="8" Height="239" HorizontalAlignment="Left" Margin="0,0,0,0" Name="tabControl2" VerticalAlignment="Top" Width="693" VerticalContentAlignment="Center">
                    <TabItem Style="{DynamicResource customTabItem1}" Header="Attributes" Name="tabItem4" HorizontalAlignment="Left" HorizontalContentAlignment="Center" FontSize="9" BorderBrush="{x:Null}">
                        <Grid Width="682">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="67*" />
                                <ColumnDefinition Width="33*" />
                                <ColumnDefinition Width="420*" />
                                <ColumnDefinition Width="0*" />
                                <ColumnDefinition Width="0*" />
                                <ColumnDefinition Width="0*" />
                                <ColumnDefinition Width="0*" />
                                <ColumnDefinition Width="18*" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="42*" />
                                <RowDefinition Height="41*" />
                                <RowDefinition Height="125*" />
                            </Grid.RowDefinitions>
                            <!--<Border Background="LightGray" Margin="-1,0,1,26" Grid.ColumnSpan="3">
                    </Border>-->
                            <Border Background="LightGray" Margin="0,1,0,23" Grid.ColumnSpan="3">
                                <Button Background="WhiteSmoke" Content="Add Attributes" Height="18" Name="add_att_b" Style="{DynamicResource LinkButton}" Width="66" HorizontalAlignment="right" Click="add_att_b_Click" />
                            </Border>
                            <Button Name="refresh_att_b" Click="refresh_att_Button_Click" Grid.Column="2" Margin="531,1,7,23" ToolTip="refresh attributes list" Grid.ColumnSpan="6">
                                <Image Source="images\refresh.jpg" Height="12" Width="13" />
                            </Button>
                            <ListBox Grid.ColumnSpan="8" Grid.RowSpan="3" Height="184" HorizontalAlignment="Left" Margin="2,19,0,0" Name="attributes_lb" VerticalAlignment="Top" Width="673" />
                            <!--<FlowDocumentReader Grid.ColumnSpan="8" HorizontalAlignment="Left" Margin="0,25,0,0" Name="domain_att_fdr" VerticalAlignment="Stretch" Width="528" BorderThickness="1" BorderBrush="LightBlue" ViewingMode="Scroll" IsPageViewEnabled="False" IsPrintEnabled="False" IsTwoPageViewEnabled="False" Grid.RowSpan="2">
                                <FlowDocumentReader.Document>
                                    <FlowDocument Name="domain_att_fd" PagePadding="3">
                                        <Table Name="domain_att_t">
                                            <Table.Columns>
                                                <TableColumn Width="25" />
                                                <TableColumn Width="457" />
                                                <TableColumn Width="27" />
                                            </Table.Columns>
                                            <TableRowGroup Name="domain_att_trg">
                                                <TableRow>
                                                    <TableCell>
                                                        <Paragraph FontSize="11" TextDecorations="underline">No</Paragraph>
                                                    </TableCell>
                                                    <TableCell>
                                                        <Paragraph FontSize="11" TextDecorations="underline">Attribute</Paragraph>
                                                    </TableCell>
                                                    <TableCell>
                                                        <Paragraph FontSize="11">
                                                            <Image Source="images\delete.png" Width="12"></Image>
                                                        </Paragraph>
                                                    </TableCell>
                                                </TableRow>
                                            </TableRowGroup>
                                        </Table>
                                    </FlowDocument>
                                </FlowDocumentReader.Document>
                            </FlowDocumentReader>-->
                        </Grid>
                    </TabItem>
                    <TabItem Style="{DynamicResource customTabItem1}" Header="Actors" Name="tabItem5" FontSize="9">
                        <Grid>
                            <Border Background="LightGray" Margin="0,0,0,190">
                                <Button Style="{StaticResource LinkButton}" Content="New Actor" Height="23" Name="primary_actor_b" Width="52" Click="primary_actor_b_Click" HorizontalAlignment="Right" />
                            </Border>
                            <ListBox Height="184" HorizontalAlignment="Left" Margin="6,19,0,0" Name="actors_lb" VerticalAlignment="Top" Width="673" />
                        </Grid>
                    </TabItem>
                </TabControl>
                
            </TabItem>
            <TabItem Style="{DynamicResource customTabItem1}" Header="Policy repository" Name="tabItem2">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="77*" />
                        <ColumnDefinition Width="461*" />
                    </Grid.ColumnDefinitions>
                    <Border Background="LightGray" Margin="1,-2,-1,221" Grid.ColumnSpan="2">
                        <Button Style="{StaticResource LinkButton}" Content="Add Policy" Height="21" Name="policy_b" Width="66" Padding="0" Click="policy_b_Click" HorizontalAlignment="Left" />
                    </Border>
                    <Label Content="(Repository of privacy policies)" Height="27" Name="label2" Width="172" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,-4,6,0" Grid.Column="1" />
                    <ListBox Grid.ColumnSpan="2" Height="214" HorizontalAlignment="Left" Margin="2,22,0,0" Name="policies_lb" VerticalAlignment="Top" Width="693" />
                    <!--<FlowDocumentReader Name="policies_fdr" Height="209" Margin="1,22,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Grid.ColumnSpan="2" ViewingMode="Scroll" IsTwoPageViewEnabled="False" IsPrintEnabled="False" IsPageViewEnabled="False">
                        <FlowDocument Name="policies_fd" PagePadding="3">
                            <Table Name="policies_t">
                                <Table.Columns>
                                    <TableColumn Width="25" />
                                    <TableColumn Width="470" />
                                    <TableColumn Width="25" />
                                </Table.Columns>
                                <TableRowGroup Name="policies_trg">
                                    <TableRow>
                                        <TableCell>
                                            <Paragraph FontSize="11" TextDecorations="underline">No</Paragraph>
                                        </TableCell>
                                        <TableCell>
                                            <Paragraph FontSize="11" TextDecorations="underline">Policy statements</Paragraph>
                                        </TableCell>
                                        <TableCell>
                                            <Paragraph FontSize="11">
                                                <Image Source="images\delete.png" Width="12"></Image>
                                            </Paragraph>
                                        </TableCell>
                                        
                                    </TableRow>
                                </TableRowGroup>
                            </Table>
                        </FlowDocument>
                    </FlowDocumentReader>-->
                </Grid>
            </TabItem>
            <TabItem Style="{DynamicResource customTabItem1}" Header="Behavioural model" Name="tabItem3">
                <Grid>
                    <Border Background="LightGray" Height="23" VerticalAlignment="Top" Margin="-1,0,1,0">
                        </Border>
                    <Button Background="WhiteSmoke" Content="Emulate" Height="18" Name="emulate_b" Style="{DynamicResource LinkButton}" Margin="646,3,4,221" Click="emulate_b_Click" />
                    <Button Style="{StaticResource LinkButton}" Content="New state machine" Height="23" HorizontalAlignment="Left" Margin="5,1,0,0" Name="use_cases_b" VerticalAlignment="Top" Width="106" Click="use_cases_b_Click" />
                    <Button Background="WhiteSmoke" Content="Confg. agents/groups" Height="18" Name="configAgentGroup_b" Style="{DynamicResource LinkButton}" Margin="280,2,295,222" Click="configAgentGroup_b_Click" />
                    <Button Margin="250,0,421,220" Name="refresh_FSMs_b" ToolTip="refresh FSM list" Click="refresh_FSMs_b_Click">
                        <Image Height="12" Source="images\refresh.jpg" Width="12" />
                    </Button>                   
                    <Grid Height="210" HorizontalAlignment="Left" Margin="6,23,0,0" Name="grid1" VerticalAlignment="Top" Width="686">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>
                        <ListBox Height="210" HorizontalAlignment="Left" Name="fsm_lb" VerticalAlignment="Top" Width="674" BorderBrush="#FFF9F9F9" AllowDrop="False" Margin="6,0,0,0" />
                    </Grid>
                    <TextBox Height="22" HorizontalAlignment="Left" Margin="109,0,0,0" Name="new_state_machine_name" VerticalAlignment="Top" Width="140" />
                </Grid>
            </TabItem>
        </TabControl>
        <Grid Grid.Row="8" Height="386" HorizontalAlignment="Left" Margin="5,82,0,0" Name="fsm_grid" VerticalAlignment="Top" Width="706">
            <wfi:WindowsFormsHost Margin="-5,-3,-3,54" Name="fsm_wfh">
            </wfi:WindowsFormsHost>
            <ProgressBar Height="19" HorizontalAlignment="Left" Name="progressBar1" VerticalAlignment="Top" Width="82" Margin="621,323,0,0" Visibility="Visible" BorderBrush="{x:Null}" />
        </Grid>
        <Menu Height="23" HorizontalAlignment="Left" Name="menu1" VerticalAlignment="Top" Width="700" Grid.Row="1" FlowDirection="RightToLeft">
            <MenuItem Header="Delete" Name="delete_project" Click="delete_project_Click"></MenuItem>
            <MenuItem Header="New" Name="new_project" Click="new_project_Click"></MenuItem>
            <MenuItem Header="Open" Name="open_project"></MenuItem>
            <MenuItem IsEnabled="False" Visibility="Hidden"></MenuItem>
        </Menu>
        <Label Content="" Height="25" HorizontalAlignment="Left" Margin="1,-2,0,0" Name="project_name_l" VerticalAlignment="Top" Grid.RowSpan="2" Width="417" FontWeight="SemiBold" Foreground="#FF10109D" />
    </Grid>
    
</Page>
